#include <iostream>
#include<unordered_map>
#include<algorithm>
using namespace std;

int main() {
    string str1;
    string str2;
    while (cin >> str1 >> str2) {
        sort(str1.begin(), str1.end());
        sort(str2.begin(), str2.end());
        int ptr1 = 0;
        int ptr2 = 0;
        while (ptr2 < str2.size()&& ptr1 < str1.size()) {
            while (ptr2 < str2.size() && str1[ptr1] == str2[ptr2]) {
                ptr1++;
                ptr2++;
            }
            if (str1[ptr1] != str2[ptr2])
                ptr1++;
        }
        if (ptr2 == str2.size()) {
            cout << "Yes" << endl;

        }
        else {
            cout << "No" << endl;
        }
    }
}
class Solution {
public:
    int lenLongestFibSubseq(vector<int>& arr) {
        int n = arr.size();
        unordered_map<int, int>st;
        for (int i = 0; i < n; i++)
            st[arr[i]] = i;

        int ret = 2;
        vector<vector<int>>dp(n, vector<int>(n, 2));
        for (int j = 2; j < n; j++)
        {
            for (int i = 1; i < j; i++)
            {
                int a = arr[j] - arr[i];
                if (st.count(a) && a < arr[i])

                    dp[i][j] = dp[st[a]][i] + 1;
                ret = max(ret, dp[i][j]);
            }
        }

        return ret < 3 ? 0 : ret;
    }
};/**
 * Definition for singly-linked list.
 * struct ListNode {
 *     int val;
 *     ListNode *next;
 *     ListNode() : val(0), next(nullptr) {}
 *     ListNode(int x) : val(x), next(nullptr) {}
 *     ListNode(int x, ListNode *next) : val(x), next(next) {}
 * };
 */
class Solution {
public:
    struct compere
    {
        bool operator()(ListNode* a, ListNode* b)
        {
            return a->val > b->val;
        }

    };




    ListNode* mergeKLists(vector<ListNode*>& lists) {
        priority_queue<ListNode*, vector<ListNode*>, compere>st;
        for (int i = 0; i < lists.size(); i++)
        {
            while (lists[i] != nullptr)
            {
                st.push(lists[i]);
                lists[i] = lists[i]->next;
            }
        }

        ListNode* newhead = new ListNode(-1);
        ListNode* tail = newhead;
        while (!st.empty())
        {
            ListNode* top = st.top();
            st.pop();
            tail->next = top;
            tail = tail->next;
        }
        tail->next = nullptr;
        return newhead->next;




    }
};